package com.yf.service.im.impl;

import com.yf.service.im.GroupUserService;
import com.yf.service.impl.BaseServiceImpl;
import com.yf.vo.GroupUserBackVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.yf.dao.im.GroupUserDao;
import com.yf.entity.GroupUserEntity;

/**
 * 群成员Service实现类
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Wed Aug 29 17:47:08 CST 2018
 */
@Service
public class GroupUserServiceImpl extends BaseServiceImpl<GroupUserEntity> implements GroupUserService {
    @Autowired
    private GroupUserDao groupUserDao;



    /**内部方法**/


    /**外部方法实现**/

    /**
     * back 群聊成员
     * @param params
     * @return
     */
    @Override
    public List<GroupUserBackVo> findGroupUser(Map<String, Object> params) {
        List<GroupUserBackVo> list = groupUserDao.findGroupUser(params);
        return list;
    }


    @Override
    public GroupUserEntity findByGroupIdAndUserId(Long userId, Long groupId) {
        return groupUserDao.findByGroupIdAndUserId(userId,groupId);
    }

    @Override
    public List<Long> findUserIdByGroupId(Long groupId) {
        return groupUserDao.findUserIdByGroupId(groupId);
    }

    @Override
    public List<GroupUserEntity> findByGroupId(Long groupId) {
        return groupUserDao.findByGroupId(groupId);
    }

    @Override
    public List<Long> findGroupIdByUserId(Long userId) {
        return groupUserDao.findGroupIdByUserId(userId);
    }
}
